//package com.tianjishuju.cimiss.station.station.api;
//
//import java.io.BufferedReader;
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.FileNotFoundException;
//import java.io.IOException;
//import java.io.InputStreamReader;
//import java.io.UnsupportedEncodingException;
//import java.math.BigDecimal;
//import java.net.URLEncoder;
//import java.util.ArrayList;
//import java.util.Arrays;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//import java.util.UUID;
//
//import com.tianjishuju.cimiss.station.station.model.OCF12HForecastVO;
//import com.tianjishuju.cimiss.station.station.model.OCF1HForecastVO;
//import com.tianjishuju.cimiss.station.station.model.OCF3HForecastVO;
//import com.tianjishuju.cimiss.station.station.util.SignatureUtils;
//import org.codehaus.jettison.json.JSONArray;
//import org.codehaus.jettison.json.JSONException;
//import org.codehaus.jettison.json.JSONObject;
//import org.hamcrest.core.Is;
//
//import com.cqweather.base.util.DateUtils;
//import com.cqweather.base.util.FTPEngine;
//import com.cqweather.base.util.FileUtil;
//import com.cqweather.base.util.HttpRequest;
//import com.cqweather.base.util.SaveFile;
//import com.cqweather.base.util.SignatureUtils;
//import com.cqweather.datacenter.dao.ForecastOCFADO;
//import com.cqweather.datacenter.vo.OCF12HForecastVO;
//import com.cqweather.datacenter.vo.OCF1HForecastVO;
//import com.cqweather.datacenter.vo.OCF3HForecastVO;
//
//public class ForecastOCFService
//{
//	private String AccessKeySecret = "2a860b8a0f57419f";
//	private String AccessKeyId = "c5c7dc0522efb328045e187c360a61b8";
//	private String localDirectory = "D:\\Temp\\";
//
//public void forecastOCF12HResolveStorage(){
//
//		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
//		String HZ = "";
//		//每天预报06、08、12、20四个时次
//		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
//			time = time + "060000";
//			HZ = "06";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
//			time = time + "080000";
//			HZ = "08";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
//			time = time + "120000";
//			HZ = "12";
//		}else{
//			time = time + "200000";
//			HZ = "20";
//		}
//
//		String dataCode = "OCF12H";
//
//		String fileName = downloagPmcvsFile(time,dataCode);
//		//String fileName = getPmcvsFile(time,dataCode);    	//String time = "20170524120000";
//		//String fileName = getPmcvsFile("20170611080000",dataCode);    	//String time = "20170524120000";
//		//fileName = "D:\\Temp\\fileName=CQ2017-05-24-11-43-49_MSP3_PMSC_OCF12H_ME_L88_GLB_201705241200_00000-36000.TXT";
//
//		BufferedReader reader = null;
//		File file = new File(fileName);
//		String row = null;
//		List<String> timesNum = Arrays.asList("12","24","36","48","60","72","84","96","108","120"
//					,"132","144","156","168","180","192","204","216","228","240"
//					,"252","264","276","288","300","312","324","336","348","360");//小时带有最高、最低温度数据的时序
//
//		int counter = 1;
//		int lineNumber = 4;
//		List<OCF12HForecastVO> oCF12HForecastVOList = new ArrayList<OCF12HForecastVO>();
//
//		String stationID = ""; //站号
//		String UTC = "";//世界时
//		String LST = "";//当地时
//		String time_zone = "";//时区
//		String report_time_LST = "";//当地时起报时间
//		String report_time_GMT8 = "";   //GMT8发布时间
//		String times_num = "";//预报时效次数；
//
//		try {
//			reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));
//
//			// 一次读入一行，直到读入null为文件结束
//	        while ((row = reader.readLine()) != null) {//====读取文件的while 循环开始
//
//	        	//为空行或行数小于3行跳过
//	        	if(counter++<lineNumber) continue;
//	        	if("".equals(row)) continue;
//
//	        	String[] rowValue = row.trim().split(" +");
//	        	String firstValue = rowValue[0];
//	        	//System.out.println("firstValue = "+firstValue );
//
//	        	//以站点开头的时候，为站号、北京时发布时间赋值
//	        	if (!timesNum.contains(firstValue)) {
//	        		stationID = firstValue;
//	        		UTC = rowValue[4];
//	        		LST = rowValue[5];
//	        		time_zone = rowValue[6];
//	        		report_time_LST = rowValue[7];
//	        		report_time_GMT8 = rowValue[8];
//	        		times_num = rowValue[9];
//	        	}else{
//                    OCF12HForecastVO oCF12HForecastVO = getOcf12HForecastVO(HZ, fileName, stationID, UTC, LST, time_zone, report_time_LST, report_time_GMT8, times_num, rowValue);
//
//                    oCF12HForecastVOList.add(oCF12HForecastVO);
//	        	}
//	        }
//
//	        ForecastOCFADO forecastOCFADO = new ForecastOCFADO();
//	        if (oCF12HForecastVOList.size() != 0) {
//
//	        	forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_12H_Products]");
//	        	forecastOCFADO.execute80("DELETE FROM [Level01A].[dbo].[OCF_12H_Products]");
//	        	forecastOCFADO.executeAddBatchOFC12H(oCF12HForecastVOList);
//			}
//	        //forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_12H_Products] WHERE report_time_LST like '" + DateUtils.getPreviousHour("yyyyMMdd", 48)+"%'");
//	        //forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_12H_Products] WHERE report_time_LST like '" + DateUtils.getCurrFormatDate("yyyyMMdd") + "%' AND HZ = '"+ HZ +"'");
//
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//
//	}
//
//    public OCF12HForecastVO getOcf12HForecastVO(String HZ, String fileName, String stationID, String UTC, String LST, String time_zone, String report_time_LST, String report_time_GMT8, String times_num, String[] rowValue) {
//        OCF12HForecastVO oCF12HForecastVO = new OCF12HForecastVO();
//
//        oCF12HForecastVO.setStationID(stationID);//站点号
//        oCF12HForecastVO.setUTC(UTC);//世界时
//        oCF12HForecastVO.setLST(LST);//当地时
//        oCF12HForecastVO.setTime_zone(time_zone);//时区
//        oCF12HForecastVO.setReport_time_LST(report_time_LST);//当地时起报时间
//        oCF12HForecastVO.setReport_time_GMT8(report_time_GMT8);//北京时发布时间
//        oCF12HForecastVO.setTimes_num(times_num);//预报时效次数；
//        oCF12HForecastVO.setHZ(HZ);//时间频次
//        oCF12HForecastVO.setInsertTime(DateUtils.getCurrentTimeHms());//写入时间
//        oCF12HForecastVO.setUpdateFilePath(fileName);//更新的文件名
//        oCF12HForecastVO.setTIME_STEP(rowValue[0]);//预报时效
//        oCF12HForecastVO.setLST_FORECAST_TIME(rowValue[1]);//与当地08时或20时对应的当地时起报时间
//        oCF12HForecastVO.setTEMP(rowValue[2]);//时刻温度
//        oCF12HForecastVO.setTEMP_MAX(rowValue[3]);//最高温度
//        oCF12HForecastVO.setTEMP_MIN(rowValue[4]);//最低温度
//        oCF12HForecastVO.setRAIN(rowValue[5]);//降水量
//        oCF12HForecastVO.setFF(rowValue[6]);//风速
//        oCF12HForecastVO.setFF_LEVEL(rowValue[7]);//风速级别
//        oCF12HForecastVO.setFF_LEVEL_DESCRIPTION(get_OCF_FF_LEVEL_DESCRIPTION(rowValue[7]));//风速级别描述
//        oCF12HForecastVO.setDD(rowValue[8]);//风向
//        oCF12HForecastVO.setDD_LEVEL(rowValue[9]);//风向级别
//        oCF12HForecastVO.setDD_LEVEL_DESCRIPTION(get_OCF_DD_LEVEL_DESCRIPTION(rowValue[9]));//风向级别描述
//        oCF12HForecastVO.setCLOUD(rowValue[10]);//云量
//        oCF12HForecastVO.setWEATHER(rowValue[11]);//天气现象编码
//        oCF12HForecastVO.setWEATHER_DESCRIPTION(get_OCF_WEATHER_DESCRIPTION(rowValue[11]));//天气现象描述
//        oCF12HForecastVO.setRH(rowValue[12]);//相对温度
//        oCF12HForecastVO.setRH_MAX(rowValue[13]);//最大相对湿度
//        oCF12HForecastVO.setRH_MIN(rowValue[14]);//最小相对湿度
//        return oCF12HForecastVO;
//    }
//
//    public void forecastOCF3HResolveStorage(){
//
//		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
//		String HZ = "";
//		//每天预报06、08、12、20四个时次
//		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
//			time = time + "060000";
//			HZ = "06";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
//			time = time + "080000";
//			HZ = "08";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
//			time = time + "120000";
//			HZ = "12";
//		}else{
//			time = time + "200000";
//			HZ = "20";
//		}
//		String dataCode = "OCF3H";
//
//		//String fileName = getPmcvsFile(time,dataCode);//String time = "20170524120000";
//		String fileName = downloagPmcvsFile(time,dataCode);
//		//fileName = "D:\\Temp\\fileName=CQ2017-05-24-11-43-49_MSP3_PMSC_OCF12H_ME_L88_GLB_201705241200_00000-36000.TXT";
//
//		BufferedReader reader = null;
//		File file = new File(fileName);
//		String row = null;
//		List<String> timesNum = Arrays.asList("00","03","06","09","12","15","18","21","24","27"
//					,"30","33","36","39","42","45","48","51","54","57"
//					,"60","63","66","69","72","78","84","90","96","102"
//					,"108","114","120","126","132","138","144","150","156","162"
//					,"168","180","192","204","216","228","240","252","264","276"
//					,"288","300","312","324","336","348","360");//小时带有最高、最低温度数据的时序
//
//		int counter = 1;
//		int lineNumber = 4;
//		List<OCF3HForecastVO> oCF3HForecastVOList = new ArrayList<OCF3HForecastVO>();
//
//		String stationID = ""; //站号
//		String UTC = "";//世界时
//		String LST = "";//当地时
//		String time_zone = "";//时区
//		//String LST_FORECAST_TIME_HEADER = "";//北京时发布时间
//		String report_time_LST = "";//当地发布时间
//		String report_time_GMT8 = "";//GMT8发布时间
//		String times_num = "";//预报时效次数
//
//		try {
//			reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));
//
//			// 一次读入一行，直到读入null为文件结束
//			while ((row = reader.readLine()) != null) {//====读取文件的while 循环开始
//
//				//为空行或行数小于3行跳过
//				if(counter++<lineNumber) continue;
//				if("".equals(row)) continue;
//
//				String[] rowValue = row.trim().split(" +");
//				String firstValue = rowValue[0];
//
//				//以站点开头的时候，为站号、北京时发布时间赋值
//				if (firstValue.length()>3) {
//					stationID = firstValue;
//					UTC = rowValue[4];
//					LST = rowValue[5];
//					time_zone = rowValue[6];
//					report_time_LST = rowValue[7];
//					report_time_GMT8 = rowValue[8];
//					times_num = rowValue[9];
//				}else{
//                    OCF3HForecastVO ocf3HForecastVO = getOcf3HForecastVO(HZ, fileName, stationID, UTC, LST, time_zone, report_time_LST, report_time_GMT8, times_num, rowValue);
//
//                    oCF3HForecastVOList.add(ocf3HForecastVO);
//				}
//			}
//
//			ForecastOCFADO forecastOCFADO = new ForecastOCFADO();
//			forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_3H_Products]");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_3H_Products] WHERE report_time_LST like '" + DateUtils.getPreviousHour("yyyyMMdd", 48)+"%'");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_3H_Products] WHERE report_time_LST like '" + DateUtils.getCurrFormatDate("yyyyMMdd") + "%' AND HZ = '"+ HZ +"'");
//			forecastOCFADO.executeAddBatchOFC3H(oCF3HForecastVOList);
//
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//
//	}
//
//    public OCF3HForecastVO getOcf3HForecastVO(String HZ, String fileName, String stationID, String UTC, String LST, String time_zone, String report_time_LST, String report_time_GMT8, String times_num, String[] rowValue) {
//        OCF3HForecastVO ocf3HForecastVO = new OCF3HForecastVO();
//
//        ocf3HForecastVO.setStationID(stationID);//站点号
//        ocf3HForecastVO.setUTC(UTC);//世界时
//        ocf3HForecastVO.setLST(LST);//当地时
//        ocf3HForecastVO.setTime_zone(time_zone);//时区
//        ocf3HForecastVO.setReport_time_LST(report_time_LST);//当地发布时间
//        ocf3HForecastVO.setReport_time_GMT8(report_time_GMT8);//GMT8发布时间
//        ocf3HForecastVO.setTimes_num(times_num);//预报时效次数
//
//        ocf3HForecastVO.setHZ(HZ);//时间频次
//        ocf3HForecastVO.setInsertTime(DateUtils.getCurrentTimeHms());//写入时间
//        ocf3HForecastVO.setUpdateFilePath(fileName);//解析的文件名及文件路径
//
//        ocf3HForecastVO.setTIME_STEP(rowValue[0]);//预报时效
//        ocf3HForecastVO.setUTC_TIME_STEP(rowValue[1]);//与世界时对应的预报时效
//        ocf3HForecastVO.setLST_FORECAST_TIME(rowValue[2]);//与当地08时或20时对应的当地时起报时间
//        ocf3HForecastVO.setTEMP(rowValue[3]);//时刻温度
//        ocf3HForecastVO.setTEMP_MAX(rowValue[4]);//最高温度
//        ocf3HForecastVO.setTEMP_MIN(rowValue[5]);//最低温度
//        ocf3HForecastVO.setRAIN(rowValue[6]);//降水量
//        ocf3HForecastVO.setFF(rowValue[7]);//风速
//        ocf3HForecastVO.setFF_LEVEL(rowValue[8]);//风速级别
//        ocf3HForecastVO.setFF_LEVEL_DESCRIPTION(get_OCF_FF_LEVEL_DESCRIPTION(rowValue[8]));//风速级别描述
//        ocf3HForecastVO.setDD(rowValue[9]);//风向
//        ocf3HForecastVO.setDD_LEVEL(rowValue[10]);//风向级别
//        ocf3HForecastVO.setDD_LEVEL_DESCRIPTION(get_OCF_DD_LEVEL_DESCRIPTION(rowValue[10]));//风向级别描述
//        ocf3HForecastVO.setCLOUD(rowValue[11]);//云量
//        ocf3HForecastVO.setWEATHER(rowValue[12]);//天气现象编码
//        ocf3HForecastVO.setWEATHER_DESCRIPTION(get_OCF_WEATHER_DESCRIPTION(rowValue[12]));//天气现象描述
//        ocf3HForecastVO.setRH(rowValue[13]);//相对温度
//        return ocf3HForecastVO;
//    }
//
//    public void forecastOCF1HResolveStorage(){
//		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
//		String HZ = null;
//		//每天预报06、08、12、20四个时次
//		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
//			time = time + "060000";
//			HZ = "06";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
//			time = time + "080000";
//			HZ = "08";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
//			time = time + "120000";
//			HZ = "12";
//		}else{
//			time = time + "200000";
//			HZ = "20";
//		}
//		String dataCode = "OCF1H";
//		String fileName = downloagPmcvsFile(time,dataCode);
//		//String filePath = "D:/360安全浏览器下载/CQ2017-07-13-07-36-48_MSP3_PMSC_OCF1H_ME_L88_GLB_201707130800_00000-36000.TXT";
//		//String fileName = filePath.substring(filePath.lastIndexOf("/")+1);
//
//		BufferedReader reader = null;
//		File file = new File(fileName);
//		String row = null;
//
//		List<String> timeStep = Arrays.asList(
//				"00","01","02","03","04","05","06","07","08","09","10"
//				,"11","12","13","14","15","16","17","18","19","20"
//				,"21","22","23","24","25","26","27","28","29","30"
//				,"31","32","33","34","35","36","37","38","39","40"
//				,"41","42","43","44","45","46","47","48","49","50"
//				,"51","52","53","54","55","56","57","58","59","60"
//				,"61","62","63","64","65","66","67","68","69","70"
//				,"71","72","75","78","81","84","87","90","93","96"
//				,"99","102","105","108","111","114","117","120","123","126"
//				,"129","132","135","138","141","144","147","150","153","156"
//				,"159","162","165","168","180","192","204","216","228","240"
//				,"252","264","276","288","300","312","324","336","348","360");
//
//		int counter = 1;
//		int lineNumber = 4;
//		List<OCF1HForecastVO> oCF1HForecastVOList = new ArrayList<OCF1HForecastVO>();
//
//		String stationID = "";//站号
//		String UTC = "";//世界时
//		String LST = "";//当地时
//		String time_zone = "";//时区
//		String report_time_LST = "";//当地发布时间
//		String report_time_GMT8 = "";//GMT+8发布时间
//		String times_num = "";//预报时效次数；
//
//		HZ = fileName.substring(fileName.indexOf("GLB_")+12, fileName.indexOf("GLB_")+14);//时间频次
//		String InsertTime = DateUtils.getCurrentTimeHms();//写入时间
//		String updateFilePath = fileName;//解析的文件名及文件路径
//
//		try {
//			reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));
//			// 一次读入一行，直到读入null为文件结束
//			while ((row = reader.readLine()) != null) {//====读取文件的while 循环开始
//
//				//为空行或行数小于3行跳过
//				if(counter++<lineNumber) continue;
//				if("".equals(row)) continue;
//
//				String[] rowValue = row.trim().split(" +");
//				String firstValue = rowValue[0];
//
//				if (!timeStep.contains(firstValue)) {
//					stationID = firstValue;
//					UTC = rowValue[4];
//					LST = rowValue[5];
//					time_zone = rowValue[6];
//					report_time_LST = rowValue[7];
//					//report_time_GMT8 = rowValue[8];
//					times_num = rowValue[8];
//				}else {
//                    OCF1HForecastVO ocf1HForecastVO = getOcf1HForecastVO( HZ, stationID, UTC, LST, time_zone, report_time_LST, times_num, insertTime, updateFilePath, rowValue);
//                    oCF1HForecastVOList.add(ocf1HForecastVO);
//				}
//
//			}
//
//			ForecastOCFADO forecastOCFADO = new ForecastOCFADO();
//			forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products]");
////			forecastOCFADO.execute80("DELETE FROM [Level01A].[dbo].[OCF_1H_Products]");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getPreviousHour("yyyyMMdd", 48)+"%'");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getCurrFormatDate("yyyyMMdd") + "%' AND HZ = '"+ HZ +"'");
//			forecastOCFADO.executeAddBatchOFC1H(oCF1HForecastVOList);
//
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//	}
//
//    public OCF1HForecastVO getOcf1HForecastVO(String HZ,
//                                              String stationID,
//                                              String UTC,
//                                              String LST,
//                                              String time_zone,
//                                              String report_time_LST,
//                                              String times_num,
//                                              String insertTime,
//                                              String updateFilePath,
//                                              String[] rowValue){
//        OCF1HForecastVO ocf1hForecastVO = new OCF1HForecastVO();
//
//        ocf1hForecastVO.setStationID(stationID);
//        ocf1hForecastVO.setUTC(UTC);
//        ocf1hForecastVO.setLST(LST);
//        ocf1hForecastVO.setTime_zone(time_zone);
//        ocf1hForecastVO.setReport_time_LST(report_time_LST);
//        //ocf1hForecastVO.setReport_time_GMT8(report_time_GMT8);
//        ocf1hForecastVO.setTimes_num(times_num);
//        ocf1hForecastVO.setHZ(HZ);
//        ocf1hForecastVO.setInsertTime(insertTime);
//        ocf1hForecastVO.setUpdateFilePath(updateFilePath);
//
//        ocf1hForecastVO.setTIME_STEP(rowValue[0]);//预报时效
//        ocf1hForecastVO.setUTC_TIME_STEP(rowValue[1]);//与世界时对应的预报时效
//        ocf1hForecastVO.setLST_FORECAST_TIME(rowValue[2]);//与当地08时或20时对应的当地时起报时间
//        ocf1hForecastVO.setTEMP(rowValue[3]);//时刻温度
//        ocf1hForecastVO.setTEMP_MAX(rowValue[4]);//上一时刻至本时刻内最高温度
//        ocf1hForecastVO.setTEMP_MIN(rowValue[5]);//上一时刻至本时刻内最低温度
//        ocf1hForecastVO.setRAIN(rowValue[6]);//上一时刻至本时刻的累积降水量
//        ocf1hForecastVO.setFF(rowValue[7]);//时刻风速
//        ocf1hForecastVO.setFF_LEVEL(rowValue[8]);//时刻风速等级
//        ocf1hForecastVO.setFF_LEVEL_DESCRIPTION(get_OCF_FF_LEVEL_DESCRIPTION(rowValue[8]));//时刻风速等级描述
//        ocf1hForecastVO.setDD(rowValue[9]);//时刻风向
//        ocf1hForecastVO.setDD_LEVEL(rowValue[10]);//时刻风向等级
//        ocf1hForecastVO.setDD_LEVEL_DESCRIPTION(get_OCF_DD_LEVEL_DESCRIPTION(rowValue[10]));//时刻风向等级描述
//        ocf1hForecastVO.setCLOUD(rowValue[11]);//时刻总云量
//        ocf1hForecastVO.setWEATHER(rowValue[12]);//上一时刻至本时刻的最严重的天气现象
//        ocf1hForecastVO.setWEATHER_DESCRIPTION(get_OCF_WEATHER_DESCRIPTION(rowValue[12]));//上一时刻至本时刻的最严重的天气现象描述
//        ocf1hForecastVO.setRH(rowValue[13]);//时刻相对湿度
//    return ocf1hForecastVO;
//    }
//	public void forecastOCF1HResolveStorage80(){
//		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
//		String HZ = null;
//		//每天预报06、08、12、20四个时次
//		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
//			time = time + "060000";
//			HZ = "06";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
//			time = time + "080000";
//			HZ = "08";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
//			time = time + "120000";
//			HZ = "12";
//		}else{
//			time = time + "200000";
//			HZ = "20";
//		}
//		String dataCode = "OCF1H";
//		String fileName = downloagPmcvsFile(time,dataCode);
//		//String filePath = "D:/360安全浏览器下载/CQ2017-07-13-07-36-48_MSP3_PMSC_OCF1H_ME_L88_GLB_201707130800_00000-36000.TXT";
//		//String fileName = filePath.substring(filePath.lastIndexOf("/")+1);
//
//		BufferedReader reader = null;
//		File file = new File(fileName);
//		String row = null;
//
//		List<String> timeStep = Arrays.asList(
//				"00","01","02","03","04","05","06","07","08","09","10"
//				,"11","12","13","14","15","16","17","18","19","20"
//				,"21","22","23","24","25","26","27","28","29","30"
//				,"31","32","33","34","35","36","37","38","39","40"
//				,"41","42","43","44","45","46","47","48","49","50"
//				,"51","52","53","54","55","56","57","58","59","60"
//				,"61","62","63","64","65","66","67","68","69","70"
//				,"71","72","75","78","81","84","87","90","93","96"
//				,"99","102","105","108","111","114","117","120","123","126"
//				,"129","132","135","138","141","144","147","150","153","156"
//				,"159","162","165","168","180","192","204","216","228","240"
//				,"252","264","276","288","300","312","324","336","348","360");
//
//		int counter = 1;
//		int lineNumber = 4;
//		List<OCF1HForecastVO> oCF1HForecastVOList = new ArrayList<OCF1HForecastVO>();
//
//		String stationID = "";//站号
//		String UTC = "";//世界时
//		String LST = "";//当地时
//		String time_zone = "";//时区
//		String report_time_LST = "";//当地发布时间
//		String report_time_GMT8 = "";//GMT+8发布时间
//		String times_num = "";//预报时效次数；
//
//		HZ = fileName.substring(fileName.indexOf("GLB_")+12, fileName.indexOf("GLB_")+14);//时间频次
//		String InsertTime = DateUtils.getCurrentTimeHms();//写入时间
//		String updateFilePath = fileName;//解析的文件名及文件路径
//
//		try {
//			reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));
//			// 一次读入一行，直到读入null为文件结束
//			while ((row = reader.readLine()) != null) {//====读取文件的while 循环开始
//
//				//为空行或行数小于3行跳过
//				if(counter++<lineNumber) continue;
//				if("".equals(row)) continue;
//
//				String[] rowValue = row.trim().split(" +");
//				String firstValue = rowValue[0];
//
//				if (!timeStep.contains(firstValue)) {
//					stationID = firstValue;
//					UTC = rowValue[4];
//					LST = rowValue[5];
//					time_zone = rowValue[6];
//					report_time_LST = rowValue[7];
//					//report_time_GMT8 = rowValue[8];
//					times_num = rowValue[8];
//				}else {
//					if(checkstation(stationID)==0){
//						continue;
//					}
//					OCF1HForecastVO ocf1hForecastVO = new OCF1HForecastVO();
//
//					ocf1hForecastVO.setStationID(stationID);
//					ocf1hForecastVO.setUTC(UTC);
//					ocf1hForecastVO.setLST(LST);
//					ocf1hForecastVO.setTime_zone(time_zone);
//					ocf1hForecastVO.setReport_time_LST(report_time_LST);
//					//ocf1hForecastVO.setReport_time_GMT8(report_time_GMT8);
//					ocf1hForecastVO.setTimes_num(times_num);
//					ocf1hForecastVO.setHZ(HZ);
//					ocf1hForecastVO.setInsertTime(InsertTime);
//					ocf1hForecastVO.setUpdateFilePath(updateFilePath);
//
//					ocf1hForecastVO.setTIME_STEP(rowValue[0]);//预报时效
//					ocf1hForecastVO.setUTC_TIME_STEP(rowValue[1]);//与世界时对应的预报时效
//					ocf1hForecastVO.setLST_FORECAST_TIME(rowValue[2]);//与当地08时或20时对应的当地时起报时间
//					ocf1hForecastVO.setTEMP(rowValue[3]);//时刻温度
//					ocf1hForecastVO.setTEMP_MAX(rowValue[4]);//上一时刻至本时刻内最高温度
//					ocf1hForecastVO.setTEMP_MIN(rowValue[5]);//上一时刻至本时刻内最低温度
//					ocf1hForecastVO.setRAIN(rowValue[6]);//上一时刻至本时刻的累积降水量
//					ocf1hForecastVO.setFF(rowValue[7]);//时刻风速
//					ocf1hForecastVO.setFF_LEVEL(rowValue[8]);//时刻风速等级
//					ocf1hForecastVO.setFF_LEVEL_DESCRIPTION(get_OCF_FF_LEVEL_DESCRIPTION(rowValue[8]));//时刻风速等级描述
//					ocf1hForecastVO.setDD(rowValue[9]);//时刻风向
//					ocf1hForecastVO.setDD_LEVEL(rowValue[10]);//时刻风向等级
//					ocf1hForecastVO.setDD_LEVEL_DESCRIPTION(get_OCF_DD_LEVEL_DESCRIPTION(rowValue[10]));//时刻风向等级描述
//					ocf1hForecastVO.setCLOUD(rowValue[11]);//时刻总云量
//					ocf1hForecastVO.setWEATHER(rowValue[12]);//上一时刻至本时刻的最严重的天气现象
//					ocf1hForecastVO.setWEATHER_DESCRIPTION(get_OCF_WEATHER_DESCRIPTION(rowValue[12]));//上一时刻至本时刻的最严重的天气现象描述
//					ocf1hForecastVO.setRH(rowValue[13]);//时刻相对湿度
//
//					oCF1HForecastVOList.add(ocf1hForecastVO);
//				}
//
//			}
//
//			ForecastOCFADO forecastOCFADO = new ForecastOCFADO();
////			forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products]");
//			forecastOCFADO.execute80("DELETE FROM [Level01A].[dbo].[OCF_1H_Products]");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getPreviousHour("yyyyMMdd", 48)+"%'");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getCurrFormatDate("yyyyMMdd") + "%' AND HZ = '"+ HZ +"'");
//			//forecastOCFADO.executeAddBatchOFC1H80(oCF1HForecastVOList);
//
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//	}
//
//	public int checkstation(String stationID){
//		int ref = 0;
//			List<String> stalist = new ArrayList<String>();
//			stalist = Arrays.asList("63714","58362","58238","57816","57516","57494","57036","52889","51463","51232","48687","48647","42809",
//					"3AJCQ000062","35188","27612","26850","16716","16008","12375","10400","10381","06343");
//			if(stalist.contains(stationID)){
//				ref = 1;
//			}
//		return ref;
//	}
//
//	public void forecastOCF1HResolveStorageHistroy(){
////		List<String> hourTempsDay = Arrays.asList(
////				"1505102678668_MSP3_PMSC_OCF1H_ME_L88_GLB_201709111200_00000-36000.DAT",
////				"1505186143468_MSP3_PMSC_OCF1H_ME_L88_GLB_201709121200_00000-36000.DAT",
////				"1505283794988_MSP3_PMSC_OCF1H_ME_L88_GLB_201709131200_00000-36000.DAT",
////				"1505358936218_MSP3_PMSC_OCF1H_ME_L88_GLB_201709141200_00000-36000.DAT",
////				"1505445328558_MSP3_PMSC_OCF1H_ME_L88_GLB_201709151200_00000-36000.DAT",
////				"1505531737823_MSP3_PMSC_OCF1H_ME_L88_GLB_201709161200_00000-36000.DAT",
////				"1505618382697_MSP3_PMSC_OCF1H_ME_L88_GLB_201709171200_00000-36000.DAT",
////				"1505704542695_MSP3_PMSC_OCF1H_ME_L88_GLB_201709181200_00000-36000.DAT",
////				"1505791182695_MSP3_PMSC_OCF1H_ME_L88_GLB_201709191200_00000-36000.DAT",
////				"1505877588516_MSP3_PMSC_OCF1H_ME_L88_GLB_201709201200_00000-36000.DAT",
////				"1505963988515_MSP3_PMSC_OCF1H_ME_L88_GLB_201709211200_00000-36000.DAT",
////				"1506050388517_MSP3_PMSC_OCF1H_ME_L88_GLB_201709221200_00000-36000.DAT",
////				"1506136548513_MSP3_PMSC_OCF1H_ME_L88_GLB_201709231200_00000-36000.DAT",
////				"1506310188515_MSP3_PMSC_OCF1H_ME_L88_GLB_201709251200_00000-36000.DAT",
////				"1506396059611_MSP3_PMSC_OCF1H_ME_L88_GLB_201709261200_00000-36000.DAT",
////				"1506482459933_MSP3_PMSC_OCF1H_ME_L88_GLB_201709271200_00000-36000.DAT",
////				"1506569258339_MSP3_PMSC_OCF1H_ME_L88_GLB_201709281200_00000-36000.DAT",
////				"1506655799610_MSP3_PMSC_OCF1H_ME_L88_GLB_201709291200_00000-36000.DAT",
////				"1506742199608_MSP3_PMSC_OCF1H_ME_L88_GLB_201709301200_00000-36000.DAT",
////				"1506828599609_MSP3_PMSC_OCF1H_ME_L88_GLB_201710011200_00000-36000.DAT",
////				"1506914999609_MSP3_PMSC_OCF1H_ME_L88_GLB_201710021200_00000-36000.DAT",
////				"1507001399613_MSP3_PMSC_OCF1H_ME_L88_GLB_201710031200_00000-36000.DAT",
////				"1507087799613_MSP3_PMSC_OCF1H_ME_L88_GLB_201710041200_00000-36000.DAT",
////				"1507174199614_MSP3_PMSC_OCF1H_ME_L88_GLB_201710051200_00000-36000.DAT",
////				"1507260599609_MSP3_PMSC_OCF1H_ME_L88_GLB_201710061200_00000-36000.DAT",
////				"1507346999608_MSP3_PMSC_OCF1H_ME_L88_GLB_201710071200_00000-36000.DAT",
////				"1507433399606_MSP3_PMSC_OCF1H_ME_L88_GLB_201710081200_00000-36000.DAT",
////				"1507519799607_MSP3_PMSC_OCF1H_ME_L88_GLB_201710091200_00000-36000.DAT",
////				"1507606199609_MSP3_PMSC_OCF1H_ME_L88_GLB_201710101200_00000-36000.DAT",
////				"1507692599608_MSP3_PMSC_OCF1H_ME_L88_GLB_201710111200_00000-36000.DAT",
////				"1507779008152_MSP3_PMSC_OCF1H_ME_L88_GLB_201710121200_00000-36000.DAT",
////				"1507865408112_MSP3_PMSC_OCF1H_ME_L88_GLB_201710131200_00000-36000.DAT",
////				"1507951808110_MSP3_PMSC_OCF1H_ME_L88_GLB_201710141200_00000-36000.DAT",
////				"1508037668111_MSP3_PMSC_OCF1H_ME_L88_GLB_201710151200_00000-36000.DAT",
////				"1508131148120_MSP3_PMSC_OCF1H_ME_L88_GLB_201710161200_00000-36000.DAT",
////				"1508210985626_MSP3_PMSC_OCF1H_ME_L88_GLB_201710171200_00000-36000.DAT",
////				"1508297085627_MSP3_PMSC_OCF1H_ME_L88_GLB_201710181200_00000-36000.DAT",
////				"1508383485626_MSP3_PMSC_OCF1H_ME_L88_GLB_201710191200_00000-36000.DAT",
////				"1508470245625_MSP3_PMSC_OCF1H_ME_L88_GLB_201710201200_00000-36000.DAT",
////				"1508555747949_MSP3_PMSC_OCF1H_ME_L88_GLB_201710211200_00000-36000.DAT",
////				"1508642147947_MSP3_PMSC_OCF1H_ME_L88_GLB_201710221200_00000-36000.DAT",
////				"1508730602869_MSP3_PMSC_OCF1H_ME_L88_GLB_201710231200_00000-36000.DAT",
////				"1508815313297_MSP3_PMSC_OCF1H_ME_L88_GLB_201710241200_00000-36000.DAT",
////				"1508901314762_MSP3_PMSC_OCF1H_ME_L88_GLB_201710251200_00000-36000.DAT",
////				"1508989566251_MSP3_PMSC_OCF1H_ME_L88_GLB_201710261200_00000-36000.DAT",
////				"1509076278407_MSP3_PMSC_OCF1H_ME_L88_GLB_201710271200_00000-36000.DAT",
////				"1509162701621_MSP3_PMSC_OCF1H_ME_L88_GLB_201710281200_00000-36000.DAT",
////				"1509246905976_MSP3_PMSC_OCF1H_ME_L88_GLB_201710291200_00000-36000.DAT",
////				"1509333306562_MSP3_PMSC_OCF1H_ME_L88_GLB_201710301200_00000-36000.DAT",
////				"1509421924539_MSP3_PMSC_OCF1H_ME_L88_GLB_201710311200_00000-36000.DAT",
////				"1509508324545_MSP3_PMSC_OCF1H_ME_L88_GLB_201711011200_00000-36000.DAT",
////				"1509594724553_MSP3_PMSC_OCF1H_ME_L88_GLB_201711021200_00000-36000.DAT",
////				"1509678904541_MSP3_PMSC_OCF1H_ME_L88_GLB_201711031200_00000-36000.DAT",
////				"1509851701446_MSP3_PMSC_OCF1H_ME_L88_GLB_201711051200_00000-36000.DAT",
////				"1509938101438_MSP3_PMSC_OCF1H_ME_L88_GLB_201711061200_00000-36000.DAT",
////				"1510024681433_MSP3_PMSC_OCF1H_ME_L88_GLB_201711071200_00000-36000.DAT",
////				"1510110901436_MSP3_PMSC_OCF1H_ME_L88_GLB_201711081200_00000-36000.DAT",
////				"1510197321438_MSP3_PMSC_OCF1H_ME_L88_GLB_201711091200_00000-36000.DAT",
////				"1510283701434_MSP3_PMSC_OCF1H_ME_L88_GLB_201711101200_00000-36000.DAT");
//		String fileDir = "W:\\Temp\\OCF\\1H\\";
//		File file = new File(fileDir);
//		File[] files = file.listFiles();
//		String fileName = "";
//
//
//		String fileFullName = "";//"W:\\Temp\\OCF\\1H\\1505102678668_MSP3_PMSC_OCF1H_ME_L88_GLB_201709111200_00000-36000.DAT";
//		//String time =  "";//"20170911120000";
//		for (int i = 0; i < files.length; i++) {
//			fileName = files[i].getName();
//
//			if (fileName.indexOf("MSP3_PMSC_OCF1H_ME_L88_GLB_201712") > -1) {
//				if (fileName.indexOf("1200_00000-36000.DAT") > -1) {
////				if (hourTempsDay.contains(fileName)) {
//					fileFullName = fileDir + fileName;
//					System.out.println("i= "+i+";fileFullName="+fileFullName);
//					forecastOCF1HResolveStorageWrite(fileFullName);
//				}
//			}
//
//		}
//	}
//
//	public void forecastOCF1HResolveStorageWrite(String filePath){
//		String dataCode = "OCF1H";
//		//filePath = "W:\\Temp\\OCF\\1H\\1505172932911_MSP3_PMSC_OCF1H_ME_L88_GLB_201709120800_00000-36000.DAT";
//		String fileName = filePath.substring(filePath.lastIndexOf("\\")+1);
//		String HZ = null;
//		HZ = fileName.substring(fileName.indexOf("GLB_")+12, fileName.indexOf("GLB_")+14);//时间频次
//
//		BufferedReader reader = null;
//		File file = new File(filePath);
//		String row = null;
//
////		List<String> timeStepjump = Arrays.asList(
////				"00","01","02","03","04","05","06","07","08","09","10"
////				,"11","12","13","14","15","16","17","18","19","20"
////				,"21","22","23","24","25","26","27","28","29","30"
////				,"31","32","33","34","35","36","37","38","39","40"
////				,"41","42","43","44","45","46","47","48","49","50"
////				,"51","52","53","54","55","56","57","58","59","60"
////				,"61","62","63","64","65","66","67","68","69","70"
////				,"71","72","75","78","81","84","87","90","93","96"
////				,"99","102","105","108","111","114","117","120","123","126"
////				,"129","132","135","138","141","144","147","150","153","156"
////				,"159","162","165","168","180","192","204","216","228","240"
////				,"252","264","276","288","300","312","324","336","348","360");
//		List<String> timeStepjump = Arrays.asList(
//				"24","25","26","27","28","29","30"
//				,"31","32","33","34","35","36","37","38","39","40"
//				,"41","42","43","44","45","46","47","48","49","50"
//				,"51","52","53","54","55","56","57","58","59","60"
//				,"61","62","63","64","65","66","67","68","69","70"
//				,"71","72","75","78","81","84","87","90","93","96"
//				,"99","102","105","108","111","114","117","120","123","126"
//				,"129","132","135","138","141","144","147","150","153","156"
//				,"159","162","165","168","180","192","204","216","228","240"
//				,"252","264","276","288","300","312","324","336","348","360");
//		List<String> timeStep = Arrays.asList(
//				"00","01","02","03","04","05","06","07","08","09","10"
//				,"11","12","13","14","15","16","17","18","19","20"
//				,"21","22","23");
//
//		int counter = 1;
//		int lineNumber = 4;
//		List<OCF1HForecastVO> oCF1HForecastVOList = new ArrayList<OCF1HForecastVO>();
//
//		String stationID = "";//站号
//		String UTC = "";//世界时
//		String LST = "";//当地时
//		String time_zone = "";//时区
//		String report_time_LST = "";//当地发布时间
//		String report_time_GMT8 = "";//GMT+8发布时间
//		String times_num = "";//预报时效次数；
//
//		String InsertTime = DateUtils.getCurrentTimeHms();//写入时间
//		String updateFilePath = filePath;//解析的文件名及文件路径
//
//		try {
//			reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "GBK"));
//			// 一次读入一行，直到读入null为文件结束
//			while ((row = reader.readLine()) != null) {//====读取文件的while 循环开始
//
//				//为空行或行数小于3行跳过
//				if(counter++<lineNumber) continue;
//				if("".equals(row)) continue;
//
//				String[] rowValue = row.trim().split(" +");
//				String firstValue = rowValue[0];
//
//				if (timeStepjump.contains(firstValue)) {
//					continue;
//				}
//
//				if (!timeStep.contains(firstValue)) {
//					stationID = firstValue;
//					System.out.println("stationID=" + stationID);
//					UTC = rowValue[4];
//					LST = rowValue[5];
//					time_zone = rowValue[6];
//					report_time_LST = rowValue[7];
//					//report_time_GMT8 = rowValue[8];
//					times_num = rowValue[8];
//				}else {
//					OCF1HForecastVO ocf1hForecastVO = new OCF1HForecastVO();
//
//					ocf1hForecastVO.setStationID(stationID);
//					ocf1hForecastVO.setUTC(UTC);
//					ocf1hForecastVO.setLST(LST);
//					ocf1hForecastVO.setTime_zone(time_zone);
//					ocf1hForecastVO.setReport_time_LST(report_time_LST);
//					//ocf1hForecastVO.setReport_time_GMT8(report_time_GMT8);
//					ocf1hForecastVO.setTimes_num(times_num);
//					ocf1hForecastVO.setHZ(HZ);
//					ocf1hForecastVO.setInsertTime(InsertTime);
//					ocf1hForecastVO.setUpdateFilePath(updateFilePath);
//
//					ocf1hForecastVO.setTIME_STEP(rowValue[0]);//预报时效
//					ocf1hForecastVO.setUTC_TIME_STEP(rowValue[1]);//与世界时对应的预报时效
//					ocf1hForecastVO.setLST_FORECAST_TIME(rowValue[2]);//与当地08时或20时对应的当地时起报时间
//					ocf1hForecastVO.setTEMP(rowValue[3]);//时刻温度
//					ocf1hForecastVO.setTEMP_MAX(rowValue[4]);//上一时刻至本时刻内最高温度
//					ocf1hForecastVO.setTEMP_MIN(rowValue[5]);//上一时刻至本时刻内最低温度
//					ocf1hForecastVO.setRAIN(rowValue[6]);//上一时刻至本时刻的累积降水量
//					ocf1hForecastVO.setFF(rowValue[7]);//时刻风速
//					ocf1hForecastVO.setFF_LEVEL(rowValue[8]);//时刻风速等级
//					ocf1hForecastVO.setFF_LEVEL_DESCRIPTION(get_OCF_FF_LEVEL_DESCRIPTION(rowValue[8]));//时刻风速等级描述
//					ocf1hForecastVO.setDD(rowValue[9]);//时刻风向
//					ocf1hForecastVO.setDD_LEVEL(rowValue[10]);//时刻风向等级
//					ocf1hForecastVO.setDD_LEVEL_DESCRIPTION(get_OCF_DD_LEVEL_DESCRIPTION(rowValue[10]));//时刻风向等级描述
//					ocf1hForecastVO.setCLOUD(rowValue[11]);//时刻总云量
//					ocf1hForecastVO.setWEATHER(rowValue[12]);//上一时刻至本时刻的最严重的天气现象
//					ocf1hForecastVO.setWEATHER_DESCRIPTION(get_OCF_WEATHER_DESCRIPTION(rowValue[12]));//上一时刻至本时刻的最严重的天气现象描述
//					ocf1hForecastVO.setRH(rowValue[13]);//时刻相对湿度
//
//					oCF1HForecastVOList.add(ocf1hForecastVO);
//				}
//
//			}
//
//			ForecastOCFADO forecastOCFADO = new ForecastOCFADO();
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products]");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getPreviousHour("yyyyMMdd", 48)+"%'");
//			//forecastOCFADO.execute("DELETE FROM [Level01A].[dbo].[OCF_1H_Products] WHERE report_time_LST like '" + DateUtils.getCurrFormatDate("yyyyMMdd") + "%' AND HZ = '"+ HZ +"'");
//			forecastOCFADO.executeAddBatchOFC1HHistory(oCF1HForecastVOList);
//
//		} catch (UnsupportedEncodingException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (FileNotFoundException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (IOException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//	}
//
//	public void LAPS3KMResolveStorage(){
//		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
//		String HZ = null;
//		//每天预报06、08、12、20四个时次
//		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
//			time = time + "060000";
//			HZ = "06";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
//			time = time + "080000";
//			HZ = "08";
//		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
//			time = time + "120000";
//			HZ = "12";
//		}else{
//			time = time + "200000";
//			HZ = "20";
//		}
//		String dataCode = "LAPS3KM";
//		String fileName = downloagPmcvsFile(time,dataCode);
//	}
//
//	/**
//	 * 获取时间戳  方法
//	 * getPmcvsFileTimestamp(这里用一句话描述这个方法的作用)
//	 * @param   name
//	 * @param  @return    设定文件
//	 * @return String    DOM对象
//	 * @Exception 异常对象
//	 * @since  CodingExample　Ver(编码范例查看) 1.1
//	 */
//	public Map<String, String> getPmcvsFileTimestamp(String time,String dataCode){
//		Map<String, String> timestampMap = new HashMap<String, String>();
//
//		String timestamp = DateUtils.getPreviousHour("yyyyMMddHHmmss", 8);
//		String AccessKeyIdUTF8 = null;
//		String signature = null;
//		//String url = "http://120.26.52.224/download/timestamp";
//		StringBuffer param = new StringBuffer();
//
//		try {
//			Map<String, String> parameter = new HashMap<String, String>();
//			parameter.put("time", time);
//			parameter.put("accessKeyID", AccessKeyId);
//			parameter.put("signatureMethod", "HMAC-SHA1");
//			parameter.put("timestamp", timestamp);
//
//			try {
//				signature = SignatureUtils.generate("GET", parameter,
//						AccessKeySecret);
//			} catch (Exception e) {
//				e.printStackTrace();
//			}
//
//			AccessKeyIdUTF8 = URLEncoder.encode(AccessKeyId, "UTF-8");
//			signature = URLEncoder.encode(signature, "UTF-8");
//
//		} catch (UnsupportedEncodingException e) {
//			e.printStackTrace();
//		}
//
//		param.append("time=").append(time);
//		param.append("&accessKeyID=").append(AccessKeyIdUTF8);
//		param.append("&signature=").append(signature);
//		param.append("&signatureMethod=HMAC-SHA1");
//		param.append("&timestamp=").append(timestamp);
//
////		String param = "time="
////				+ time
////				+ "&accessKeyID="
////				+ AccessKeyIdUTF8
////		        + "&signature=" + signature
////				+ "&signatureMethod=HMAC-SHA1"
////				+ "&timestamp=" + timestamp;
//
//		String resultTimestamp = HttpRequest.sendPost("http://120.26.52.224/download/timestamp", param.toString());
//		System.out.println(resultTimestamp);
//		//{"result":{"OCF1H":{"original":[1501025375754]},"OCF12H":{"original":[1501025058595]},"OCF3H":{"original":[1501025005783]}},"success":true}
//
//		//解析 resultTimestamp
//		try {
//			JSONObject obj = new JSONObject(resultTimestamp);
//			String resutlString = obj.getString("success");
//			if ("true".equals(resutlString)) {
//
//				JSONObject obj2 = new JSONObject(obj.getString("result"));
//
//				if ("OCF1H".equals(dataCode)) {
//					JSONObject obj3 = new JSONObject(obj2.getString("OCF1H"));
//					JSONArray obj31 = new JSONArray(obj3.getString("original"));
//					String oCF1HTimestamp = obj31.getString(0);
//					timestampMap.put("OCF1H", obj31.getString(0));
//					System.out.println("oCF1HTimestamp = " + oCF1HTimestamp);
//				}
//
//				if ("OCF3H".equals(dataCode)) {
//					JSONObject obj4 = new JSONObject(obj2.getString("OCF3H"));
//					JSONArray obj41 = new JSONArray(obj4.getString("original"));
//					String oCF3HTimestamp = obj41.getString(0);
//					System.out.println("oCF3HTimestamp = " + oCF3HTimestamp);
//					timestampMap.put("OCF3H", obj41.getString(0));
//				}
//
//				if ("OCF12H".equals(dataCode)) {
//					JSONObject obj5 = new JSONObject(obj2.getString("OCF12H"));
//					JSONArray obj51 = new JSONArray(obj5.getString("original"));
//					String oCF12HTimestamp = obj51.getString(0);
//					System.out.println("oCF12HTimestamp = " + oCF12HTimestamp);
//					timestampMap.put("OCF12H", obj51.getString(0));
//				}
//
//				if ("LAPS3KM".equals(dataCode)) {
//					JSONObject obj6 = new JSONObject(obj2.getString("LAPS3KM"));
//					JSONArray obj61 = new JSONArray(obj6.getString("original"));
//					String LAPS3KMTimestamp = obj61.getString(0);
//					System.out.println("LAPS3KMTimestamp = " + LAPS3KMTimestamp);
//					timestampMap.put("LAPS3KM", obj61.getString(0));
//				}
//			}
//
//		} catch (JSONException e) {
//			e.printStackTrace();
//		}
//		return timestampMap;
//	}
//
//	/**
//	 * 下载OCF预报文件
//	 * downloagPmcvsFile(这里用一句话描述这个方法的作用)
//	 * @param   time 20170724060000
//	 * @param   dataCode OCF1H  OCF3H  OCF12H
//	 * @param  @return    设定文件
//	 * @return String    DOM对象
//	 * @Exception 异常对象
//	 * @since  CodingExample　Ver(编码范例查看) 1.1
//	 */
//	public String downloagPmcvsFile(String time,String dataCode ){
//		String fileName = null;
//
//		String format = "dat";
//		String fc = "original";
//		String timestamp = null;
//		String nonce = UUID.randomUUID().toString();
//		String AccessKeySecretUTF8 = null;
//		String signature = "";
//		timestamp = getPmcvsFileTimestamp(time,dataCode).get(dataCode);
//		String tempLocalDirectory = null;
//
//		if ("OCF12H".equals(dataCode)) {tempLocalDirectory = localDirectory + "OCF\\12H\\";}
//		if ("OCF3H".equals(dataCode)) {tempLocalDirectory = localDirectory + "OCF\\3H\\";}
//		if ("OCF1H".equals(dataCode)) {tempLocalDirectory = localDirectory + "OCF\\1H\\";}
//		if ("LAPS3KM".equals(dataCode)) {tempLocalDirectory = localDirectory + "LAPS\\LAPS3KM\\"; format = "gr2";}
//
//    	//创建临时目录
//		File tmpFile = new File(tempLocalDirectory);
//		if (!tmpFile.exists()) {
//			tmpFile.mkdirs();
//		}
//
//		try {
//			Map<String, String> parameter = new HashMap<String, String>();
//			parameter.put("dataCode", dataCode);
//			parameter.put("elements", "ME");
//			parameter.put("time", time);
//			parameter.put("type", "L88");
//			parameter.put("accessKeyID", AccessKeyId);
//			parameter.put("format", format);
//			parameter.put("version", "1.0");
//			parameter.put("signatureMethod", "HMAC-SHA1");
//			parameter.put("signatureNonce", nonce);
//			parameter.put("timestamp", timestamp);
//			parameter.put("fc", fc);
//
//			try {
//				signature = SignatureUtils.generate("GET", parameter,
//						AccessKeySecret);
//			} catch (Exception e) {
//
//				e.printStackTrace();
//			}
//
//			AccessKeySecretUTF8 = URLEncoder.encode(AccessKeyId, "UTF-8");
//			signature = URLEncoder.encode(signature, "UTF-8");
//
//		} catch (UnsupportedEncodingException e) {
//			e.printStackTrace();
//		}
//
//		String showurl = "http://120.26.52.224/download/down?dataCode="+dataCode+"&elements=ME&time="
//				+ time
//				+ "&type=L88&accessKeyID="
//				+ AccessKeySecretUTF8
//				+ "&format="+format+"&version=1.0"
//		        + "&signature=" + signature
//				+ "&signatureMethod=HMAC-SHA1&signatureNonce=" + nonce
//				+ "&timestamp=" + timestamp+"&fc="+fc;
//		System.out.println(showurl);
//
//		SaveFile sf = new SaveFile();
//		fileName = sf.saveToFile3(showurl,tempLocalDirectory);
//
//		return tempLocalDirectory+fileName;
//	}
//
//
//	public void buildYXOLCDFile(){
//		//重庆,西安,兰州,乌鲁木齐,阿拉山口,阿斯塔纳,莫斯科,明斯克,华沙,杜伊斯堡,贵阳,南宁,钦州港经济技术开发区_XZZGX001037,新加坡-廷加
//		List<String> yxoStaion = Arrays.asList("57516","57036","52889","51463","51232","35188","27612","26850","12375","10400","57816","59431","XZZGX001037","48687");
//		List<String> yxoStaionName = Arrays.asList("chongqing","xian","lanzhou","wulumuqi","alashankou","asitana","mosike","mingsike","huasha","duyisibao","guiyang","nanning","qzg","xinjiapo");
//		Map<String,String> yxoWather12Map = new HashMap<String, String>();
//		Map<String,String> yxoWather24Map = new HashMap<String, String>();
//		Map<String,String> yxoTempMin12Map = new HashMap<String, String>();
//		Map<String,String> yxoTempMax12Map = new HashMap<String, String>();
//		Map<String,String> yxoTempMin24Map = new HashMap<String, String>();
//		Map<String,String> yxoTempMax24Map = new HashMap<String, String>();
//		StringBuffer condition = new StringBuffer();
//
//		StringBuffer sql = new StringBuffer();
//		sql.append("SELECT TOP 20 [stationID],[HZ],[TIME_STEP],[InsertTime]");
//		sql.append(",[report_time_LST],[LST_FORECAST_TIME],[TEMP],[TEMP_MAX],[TEMP_MIN],[RH]");
//		sql.append(",[RAIN],[DD],[DD_LEVEL],[DD_LEVEL_DESCRIPTION],[FF],[FF_LEVEL]");
//		sql.append(",[FF_LEVEL_DESCRIPTION],[CLOUD],[WEATHER],[WEATHER_DESCRIPTION]");
//		sql.append(",[UpdateFilePath] FROM [Level01A].[dbo].[OCF_12H_Products]");
//		sql.append(" WHERE 1 = 1 ");
//
//		//准备查询条件
//		condition.append("and stationID in(");
//		for (int i = 0; i < yxoStaion.size(); i++) {
//			condition.append("'");
//			condition.append(yxoStaion.get(i));
//
//			if (i == yxoStaion.size()-1) {
//				condition.append("'");
//			}else{
//				condition.append("',");
//			}
//		}
//		condition.append(") AND TIME_STEP in('12','24')");
//		condition.append(" ORDER BY InsertTime DESC,stationID,TIME_STEP ");
//
//		if ((null != condition) && (!("".equals(condition)))) {
//			sql.append(condition);
//		}
//
//		//中国气象局2017-6-27 08时发布
//		String pubDate = "";
//
//		//查询出 渝新欧  相关站点预报
//		ForecastOCFADO fOCFADO = new ForecastOCFADO();
//		List list = fOCFADO.executeQuery(sql.toString(), null);
//		if (list.size()>0) {
//
//			for (int i = 0; i < list.size(); i++) {
//				Map row = (Map) list.get(i);
//				//pubDate = row.get("pubDate").toString();
//				pubDate = row.get("InsertTime").toString();
//				if ("12".equals(row.get("TIME_STEP").toString())) {
//
//					yxoTempMin12Map.put(row.get("stationID").toString(), new BigDecimal(row.get("TEMP_MIN").toString().trim()).setScale(0, BigDecimal.ROUND_HALF_UP).toString());
//					//yxoTempMin12Map.put(row.get("stationID").toString(), row.get("TEMP_MIN").toString().trim().substring(0, row.get("TEMP_MIN").toString().trim().indexOf(".")));
//					yxoTempMax12Map.put(row.get("stationID").toString(), new BigDecimal(row.get("TEMP_MAX").toString().trim()).setScale(0, BigDecimal.ROUND_HALF_UP).toString());
//					//yxoTempMax12Map.put(row.get("stationID").toString(), row.get("TEMP_MAX").toString().trim().substring(0, row.get("TEMP_MAX").toString().trim().indexOf(".")));
//					yxoWather12Map.put(row.get("stationID").toString(), row.get("WEATHER_DESCRIPTION").toString());
//				}else if ("24".equals(row.get("TIME_STEP").toString())) {
//					yxoTempMin24Map.put(row.get("stationID").toString(), new BigDecimal(row.get("TEMP_MIN").toString().trim()).setScale(0, BigDecimal.ROUND_HALF_UP).toString());
////					yxoTempMin24Map.put(row.get("stationID").toString(), row.get("TEMP_MIN").toString().trim().substring(0, row.get("TEMP_MIN").toString().trim().indexOf(".")));
//					yxoTempMax24Map.put(row.get("stationID").toString(), new BigDecimal(row.get("TEMP_MAX").toString().trim()).setScale(0, BigDecimal.ROUND_HALF_UP).toString());
////					yxoTempMax24Map.put(row.get("stationID").toString(), row.get("TEMP_MAX").toString().trim().substring(0, row.get("TEMP_MAX").toString().trim().indexOf(".")));
//					yxoWather24Map.put(row.get("stationID").toString(), row.get("WEATHER_DESCRIPTION").toString());
//				}
//			}
//			//pubDate = "中国气象局" + DateUtils.toStringDate(DateUtils.toLongDate(pubDate, "yyyyMMddHH"), "yyyy-M-d HH") + "时发布";
//			pubDate = "中国气象局" + DateUtils.toStringDate(DateUtils.toLongDate(pubDate, "yyyy-MM-dd HH:mm:ss"), "yyyy-M-d HH") + "时发布";
//
//			//写渝新欧 lcd 文件
//	        String yxoLcdFileDirectory = "D:/Temp/yxo/";
//	        String yxoTempfileName = "";
//	        String yxoWeatherfileName = "";
//	        String yxoTempMin = "";
//	        String yxoTempMax = "";
//	        String yxoWeather = "";
//
//	        //生成lcd渝新欧文件
//	        if (FileUtil.CreateDirectory(yxoLcdFileDirectory)) {
//		        for (int i = 0; i < yxoStaion.size(); i++) {
//
//		        	yxoTempfileName = "curr_temp_yxo_" + yxoStaionName.get(i) + ".txt";
//		        	yxoWeatherfileName = "curr_weather_yxo_" + yxoStaionName.get(i) + ".txt";
//
//		        	if (Double.parseDouble(yxoTempMin12Map.get(yxoStaion.get(i))) < Double.parseDouble(yxoTempMin24Map.get(yxoStaion.get(i)))) {
//						yxoTempMin = yxoTempMin12Map.get(yxoStaion.get(i));
//					}else{
//						yxoTempMin = yxoTempMin24Map.get(yxoStaion.get(i));
//					}
//
//		        	if (Double.parseDouble(yxoTempMax12Map.get(yxoStaion.get(i))) > Double.parseDouble(yxoTempMax24Map.get(yxoStaion.get(i)))) {
//		        		yxoTempMax = yxoTempMax12Map.get(yxoStaion.get(i));
//		        	}else{
//		        		yxoTempMax = yxoTempMax24Map.get(yxoStaion.get(i));
//		        	}
//
//		        	if (yxoWather12Map.get(yxoStaion.get(i)).equals(yxoWather24Map.get(yxoStaion.get(i)))) {
//		        		yxoWeather = yxoWather12Map.get(yxoStaion.get(i));
//					}else{
//						yxoWeather = yxoWather12Map.get(yxoStaion.get(i)) + "转"  +yxoWather24Map.get(yxoStaion.get(i));
//					}
//
//		        	FileUtil.writeFileU(yxoLcdFileDirectory+yxoTempfileName, yxoTempMin+"~"+yxoTempMax+"℃");
//		        	FileUtil.writeFileU(yxoLcdFileDirectory+yxoWeatherfileName, yxoWeather);
//
//	//	        	fileUtil.createFile(yxoLcdFileDirectory+yxoTempfileName,yxoTempMin+"~"+yxoTempMax+"℃");
//	//	        	fileUtil.createFile(yxoLcdFileDirectory+yxoWeatherfileName,yxoWeather);
//				}
//		        FileUtil.writeFileU(yxoLcdFileDirectory+"curr_temp_yxo_releasetime.txt", pubDate);
//	//	        fileUtil.createFile(yxoLcdFileDirectory+"curr_temp_yxo_releasetime.txt", pubDate);
//
//		        FTPEngine ftpEngine1 = new FTPEngine("FTP13_1");
//		        FTPEngine ftpEngine2 = new FTPEngine("FTP13_2");
//		        FTPEngine ftpEngine3 = new FTPEngine("FTP13_3");
//		        //电梯右
//		        try {
//		        	ftpEngine1.connect();
//			        ftpEngine1.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//					e1.printStackTrace();
//				}
//		        //电梯左
//		        try {
//		        	ftpEngine2.connect();
//		        	ftpEngine2.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //货梯
//		        try {
//		        	ftpEngine3.connect();
//		        	ftpEngine3.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //1楼
//		        FTPEngine ftpEngine14_1 = new FTPEngine("FTP14_1");
//		        try {
//		        	ftpEngine14_1.connect();
//		        	ftpEngine14_1.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //2楼
//		        FTPEngine ftpEngine14_2 = new FTPEngine("FTP14_2");
//		        try {
//		        	ftpEngine14_2.connect();
//		        	ftpEngine14_2.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //3楼
//		        FTPEngine ftpEngine14_3 = new FTPEngine("FTP14_3");
//		        try {
//		        	ftpEngine14_3.connect();
//		        	ftpEngine14_3.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //4楼
//		        FTPEngine ftpEngine14_4 = new FTPEngine("FTP14_4");
//		        try {
//		        	ftpEngine14_4.connect();
//		        	ftpEngine14_4.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //5楼
//		        FTPEngine ftpEngine14_5 = new FTPEngine("FTP14_5");
//		        try {
//		        	ftpEngine14_5.connect();
//		        	ftpEngine14_5.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //6楼
//		        FTPEngine ftpEngine14_6 = new FTPEngine("FTP14_6");
//		        try {
//		        	ftpEngine14_6.connect();
//		        	ftpEngine14_6.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //7楼
//		        FTPEngine ftpEngine14_7 = new FTPEngine("FTP14_7");
//		        try {
//		        	ftpEngine14_7.connect();
//		        	ftpEngine14_7.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //8楼
//		        FTPEngine ftpEngine14_8 = new FTPEngine("FTP14_8");
//		        try {
//		        	ftpEngine14_8.connect();
//		        	ftpEngine14_8.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //9楼
//		        FTPEngine ftpEngine14_9 = new FTPEngine("FTP14_9");
//		        try {
//		        	ftpEngine14_9.connect();
//		        	ftpEngine14_9.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //10楼
//		        FTPEngine ftpEngine14_10 = new FTPEngine("FTP14_10");
//		        try {
//		        	ftpEngine14_10.connect();
//		        	ftpEngine14_10.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //11楼
//		        FTPEngine ftpEngine14_11 = new FTPEngine("FTP14_11");
//		        try {
//		        	ftpEngine14_11.connect();
//		        	ftpEngine14_11.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //12楼
//		        FTPEngine ftpEngine14_12 = new FTPEngine("FTP14_12");
//		        try {
//		        	ftpEngine14_12.connect();
//		        	ftpEngine14_12.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //13楼
//		        FTPEngine ftpEngine14_13 = new FTPEngine("FTP14_13");
//		        try {
//		        	ftpEngine14_13.connect();
//		        	ftpEngine14_13.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //14楼
//		        FTPEngine ftpEngine14_14 = new FTPEngine("FTP14_14");
//		        try {
//		        	ftpEngine14_14.connect();
//		        	ftpEngine14_14.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //15楼
//		        FTPEngine ftpEngine14_15 = new FTPEngine("FTP14_15");
//		        try {
//		        	ftpEngine14_15.connect();
//		        	ftpEngine14_15.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //16楼
//		        FTPEngine ftpEngine14_16 = new FTPEngine("FTP14_16");
//		        try {
//		        	ftpEngine14_16.connect();
//		        	ftpEngine14_16.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //17楼
//		        FTPEngine ftpEngine14_17 = new FTPEngine("FTP14_17");
//		        try {
//		        	ftpEngine14_17.connect();
//		        	ftpEngine14_17.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//		        //18楼
//		        FTPEngine ftpEngine14_18 = new FTPEngine("FTP14_18");
//		        try {
//		        	ftpEngine14_18.connect();
//		        	ftpEngine14_18.uploadU(yxoLcdFileDirectory,"/ChongQingDataTouch/cur_temp/");
//		        } catch (IOException e) {
//		        	e.printStackTrace();
//		        } catch (Exception e1) {
//		        	e1.printStackTrace();
//		        }
//			}
//		}else{
//
//		}
//	}
//
//
//	/**
//	 *
//
//	 * get_OCF_FF_LEVEL_DESCRIPTION(根据传入的风速等级，返回风速等级描述)
//
//	 * @param   FF_LEVEL 风速等级
//
//	 * @param  @return    FF_LEVEL_DESCRIPTION 风速等级描述
//
//	 * @Exception 异常对象
//
//	 * @since  CodingExample　Ver(编码范例查看) 1.1
//	 */
//	public String get_OCF_FF_LEVEL_DESCRIPTION(String FF_LEVEL){
//		String FF_LEVEL_DESCRIPTION = "";
//		switch (FF_LEVEL.substring(0, FF_LEVEL.indexOf("."))) {
//		case "0":
//			FF_LEVEL_DESCRIPTION = "微风";
//			break;
//
//		case "1":
//			FF_LEVEL_DESCRIPTION = "3-4级";
//			break;
//
//		case "2":
//			FF_LEVEL_DESCRIPTION = "4-5级";
//			break;
//
//		case "3":
//			FF_LEVEL_DESCRIPTION = "5-6级";
//			break;
//
//		case "4":
//			FF_LEVEL_DESCRIPTION = "6-7级";
//			break;
//
//		case "5":
//			FF_LEVEL_DESCRIPTION = "7-8级";
//			break;
//
//		case "6":
//			FF_LEVEL_DESCRIPTION = "8-9级";
//			break;
//
//		case "7":
//			FF_LEVEL_DESCRIPTION = "9-10级";
//			break;
//
//		case "8":
//			FF_LEVEL_DESCRIPTION = "10-11级";
//			break;
//
//		case "9":
//			FF_LEVEL_DESCRIPTION = "11-12级";
//			break;
//		}
//		return FF_LEVEL_DESCRIPTION;
//	}
//	/**
//	 *
//
//	 * get_OCF_WEATHER_DESCRIPTION(根据传入的天气现象代码，返回天气现象描述)
//
//	 * @param   WEATHER 风速等级
//
//	 * @param  @return    WEATHER_DESCRIPTION 天气现象描述
//
//	 * @Exception 异常对象
//
//	 * @since  CodingExample　Ver(编码范例查看) 1.1
//	 */
//	public String get_OCF_WEATHER_DESCRIPTION(String WEATHER){
//		String WEATHER_DESCRIPTION = "";
//		switch (WEATHER.substring(0, WEATHER.indexOf("."))) {
//		case "0": WEATHER_DESCRIPTION = "晴"; break;
//		case "1": WEATHER_DESCRIPTION = "多云"; break;
//		case "2": WEATHER_DESCRIPTION = "阴"; break;
//		case "3": WEATHER_DESCRIPTION = "阵雨"; break;
//		case "4": WEATHER_DESCRIPTION = "雷阵雨"; break;
//		case "5": WEATHER_DESCRIPTION = "雷阵雨伴有冰雹"; break;
//		case "6": WEATHER_DESCRIPTION = "雨夹雪"; break;
//		case "7": WEATHER_DESCRIPTION = "小雨"; break;
//		case "8": WEATHER_DESCRIPTION = "中雨"; break;
//		case "9": WEATHER_DESCRIPTION = "大雨"; break;
//		case "10": WEATHER_DESCRIPTION = "暴雨"; break;
//		case "11": WEATHER_DESCRIPTION = "大暴雨"; break;
//		case "12": WEATHER_DESCRIPTION = "特大暴雨"; break;
//		case "13": WEATHER_DESCRIPTION = "阵雪"; break;
//		case "14": WEATHER_DESCRIPTION = "小雪"; break;
//		case "15": WEATHER_DESCRIPTION = "中雪"; break;
//		case "16": WEATHER_DESCRIPTION = "大雪"; break;
//		case "17": WEATHER_DESCRIPTION = "暴雪"; break;
//		case "18": WEATHER_DESCRIPTION = "雾"; break;
//		case "19": WEATHER_DESCRIPTION = "冻雨"; break;
//		case "20": WEATHER_DESCRIPTION = "沙尘暴"; break;
//		case "21": WEATHER_DESCRIPTION = "小到中雨"; break;
//		case "22": WEATHER_DESCRIPTION = "中到大雨"; break;
//		case "23": WEATHER_DESCRIPTION = "大到暴雨"; break;
//		case "24": WEATHER_DESCRIPTION = "暴雨到大暴雨"; break;
//		case "25": WEATHER_DESCRIPTION = "大暴雨到特大暴雨"; break;
//		case "26": WEATHER_DESCRIPTION = "小到中雪"; break;
//		case "27": WEATHER_DESCRIPTION = "中到大雪"; break;
//		case "28": WEATHER_DESCRIPTION = "大到暴雪"; break;
//		case "29": WEATHER_DESCRIPTION = "浮尘"; break;
//		case "30": WEATHER_DESCRIPTION = "扬沙"; break;
//		case "31": WEATHER_DESCRIPTION = "强沙尘暴"; break;
//		case "32": WEATHER_DESCRIPTION = "浓雾"; break;
//		case "49": WEATHER_DESCRIPTION = "强浓雾"; break;
//		case "53": WEATHER_DESCRIPTION = "霾"; break;
//		case "54": WEATHER_DESCRIPTION = "中度霾"; break;
//		case "55": WEATHER_DESCRIPTION = "重度霾"; break;
//		case "56": WEATHER_DESCRIPTION = "严重霾"; break;
//		case "57": WEATHER_DESCRIPTION = "大雾"; break;
//		case "58": WEATHER_DESCRIPTION = "特强浓雾"; break;
//		case "301": WEATHER_DESCRIPTION = "雨"; break;
//		case "302": WEATHER_DESCRIPTION = "雪"; break;
//
//		}
//		return WEATHER_DESCRIPTION;
//	}
//	/**
//	 *
//
//	 * get_OCF_DD_LEVEL_DESCRIPTION(根据传入的风速等级，返回风速等级描述)
//
//	 * @param   DD_LEVEL 风速等级
//
//	 * @param  @return    DD_LEVEL_DESCRIPTION 风速等级描述
//
//	 * @Exception 异常对象
//
//	 * @since  CodingExample　Ver(编码范例查看) 1.1
//	 */
//	public String get_OCF_DD_LEVEL_DESCRIPTION(String DD_LEVEL){
//		String DD_LEVEL_DESCRIPTION = "";
//		switch (DD_LEVEL.substring(0, DD_LEVEL.indexOf("."))) {
//		case "0":
//			DD_LEVEL_DESCRIPTION = "北风";
//			break;
//
//		case "1":
//			DD_LEVEL_DESCRIPTION = "东北";
//			break;
//
//		case "2":
//			DD_LEVEL_DESCRIPTION = "东";
//			break;
//
//		case "3":
//			DD_LEVEL_DESCRIPTION = "东南";
//			break;
//
//		case "4":
//			DD_LEVEL_DESCRIPTION = "南";
//			break;
//
//		case "5":
//			DD_LEVEL_DESCRIPTION = "西南";
//			break;
//
//		case "6":
//			DD_LEVEL_DESCRIPTION = "西";
//			break;
//
//		case "7":
//			DD_LEVEL_DESCRIPTION = "西北";
//			break;
//
//		case "8":
//			DD_LEVEL_DESCRIPTION = "北";
//			break;
////
////		case "9":
////			DD_LEVEL_DESCRIPTION = "旋转";
////			break;
////
////		default:
////			break;
//		}
//		return DD_LEVEL_DESCRIPTION;
//	}
//
////	public static void main(String[] args)
////	{
////		List<OCF12HForecastVO> oCF12HForecastVOList = new ArrayList<OCF12HForecastVO>();
////		if (oCF12HForecastVOList.size() == 0) {
////			System.out.println(" null");
////		}else{
////			System.out.println(" not null ");
////		}
////		//System.out.println(new BigDecimal("-0.4").setScale(0, BigDecimal.ROUND_HALF_UP));
////
////
//////		String time = DateUtils.getCurrFormatDate("yyyyMMdd");
////////		String HZ = "";
////////		//每天预报06、08、12、20四个时次
////////		if (Integer.parseInt(DateUtils.getCurrentHour())<8) {
////////			time = time + "060000";
////////			HZ = "06";
////////		}else if(Integer.parseInt(DateUtils.getCurrentHour())<12){
////////			time = time + "080000";
////////			HZ = "08";
////////		}else if(Integer.parseInt(DateUtils.getCurrentHour())<20){
////////			time = time + "120000";
////////			HZ = "12";
////////		}else{
////////			time = time + "200000";
////////			HZ = "20";
////////		}
//////		time = "20171012080000";
//////		String dataCode = "LAPS3KM";
//////
//////		ForecastOCFService forecastOCFService = new ForecastOCFService();
//////		//forecastOCFService.getPmcvsFileTimestamp(time);
//////		//forecastOCFService.LAPS3KMResolveStorage();
//////		//forecastOCFService.downloagPmcvsFile(time, dataCode);
//////		//forecastOCFService.forecastOCF1HResolveStorage();
//////
//////		forecastOCFService.forecastOCF1HResolveStorageHistroy();
////
////	}
//}
